<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="generator" content="hevea 2.18">
<link rel="stylesheet" type="text/css" href="manual.css">
<title>Chapter&#XA0;29&#XA0;&#XA0;The num library: arbitrary-precision rational arithmetic</title>
</head>
<body>
<a href="libunix.html"><img src="previous_motif.gif" alt="Previous"></a>
<a href="index.html"><img src="contents_motif.gif" alt="Up"></a>
<a href="libstr.html"><img src="next_motif.gif" alt="Next"></a>
<hr>
<h1 class="chapter" id="sec555">Chapter&#XA0;29&#XA0;&#XA0;The num library: arbitrary-precision rational arithmetic</h1>
<p>The <span class="c003">num</span> library implements integer arithmetic and rational
arithmetic in arbitrary precision. It was split off the core
OCaml distribution starting with the 4.06.0 release, and can now be found
at <a href="https://github.com/ocaml/num"><span class="c003">https://github.com/ocaml/num</span></a>.</p><p>New applications that need arbitrary-precision arithmetic should use the
<span class="c003">Zarith</span> library (<a href="https://github.com/ocaml/Zarith"><span class="c003">https://github.com/ocaml/Zarith</span></a>) instead of the <span class="c003">Num</span>
library, and older applications that already use <span class="c003">Num</span> are encouraged to
switch to <span class="c003">Zarith</span>. <span class="c003">Zarith</span> delivers much better performance than <span class="c003">Num</span>
and has a nicer API.

</p>
<hr>
<a href="libunix.html"><img src="previous_motif.gif" alt="Previous"></a>
<a href="index.html"><img src="contents_motif.gif" alt="Up"></a>
<a href="libstr.html"><img src="next_motif.gif" alt="Next"></a>
</body>
</html>
